Basic: thread CodeGenOptions into TargetInfo
This threads CodeGenOptions into the TargetInfo hierarchy. This is motivated by
ARM which can change some target information based on the EABI selected
(-meabi). Similar options exist for other platforms (e.g. MIPS) and thus is
generally useful. NFC.
llvm-svn: 265640
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index cac73be..76f2f9b 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -830,7 +830,8 @@
// Create the target instance.
setTarget(TargetInfo::CreateTargetInfo(getDiagnostics(),
- getInvocation().TargetOpts));
+ getInvocation().TargetOpts,
+ getInvocation().getCodeGenOpts()));
if (!hasTarget())
return false;
@@ -838,7 +839,8 @@
if (getLangOpts().CUDA && !getFrontendOpts().AuxTriple.empty()) {
std::shared_ptr<TargetOptions> TO(new TargetOptions);
TO->Triple = getFrontendOpts().AuxTriple;
- setAuxTarget(TargetInfo::CreateTargetInfo(getDiagnostics(), TO));
+ setAuxTarget(TargetInfo::CreateTargetInfo(getDiagnostics(), TO,
+ getInvocation().getCodeGenOpts()));
}
// Inform the target of the language options.