diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-03-28 22:49:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-03-28 22:49:19 +0000 |
commit | a7b8c2b6a416052bd7b48d3c0d702d266c6ac3a2 (patch) | |
tree | 93a5a222a4ee69f39c1389cca5241cd4f3b25501 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | c6cf43d25853efb4a6765954eda52a45998a47f2 (diff) |
Integrated-As: Add support for setting the AllowTemporaryLabels flag via
integrated-as.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 89013a63ca..8c2794a729 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -126,6 +126,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, return true; assert(Context != 0 && "Failed to get MCContext"); + if (hasMCSaveTempLabels()) + Context->setAllowTemporaryLabels(false); + const MCAsmInfo &MAI = *getMCAsmInfo(); OwningPtr<MCStreamer> AsmStreamer; @@ -231,6 +234,9 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify, Ctx)) return true; + if (hasMCSaveTempLabels()) + Ctx->setAllowTemporaryLabels(false); + // Create the code emitter for the target if it exists. If not, .o file // emission fails. MCCodeEmitter *MCE = getTarget().createCodeEmitter(*this, *Ctx); |