summaryrefslogtreecommitdiff
path: root/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-28 22:49:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-28 22:49:15 +0000
commitc6cf43d25853efb4a6765954eda52a45998a47f2 (patch)
tree154af0ed2d8ee6851d48b983b2170362032061bf /lib/MC/MCContext.cpp
parentcede7c05518b8eea67da7e48d0952cc485764737 (diff)
downloadllvm-c6cf43d25853efb4a6765954eda52a45998a47f2.tar.gz
llvm-c6cf43d25853efb4a6765954eda52a45998a47f2.tar.bz2
llvm-c6cf43d25853efb4a6765954eda52a45998a47f2.tar.xz
MC: Add support for disabling "temporary label" behavior. Useful for debugging
on Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r--lib/MC/MCContext.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index 018f00c08f..7c687135fc 100644
--- a/lib/MC/MCContext.cpp
+++ b/lib/MC/MCContext.cpp
@@ -28,7 +28,8 @@ typedef StringMap<const MCSectionCOFF*> COFFUniqueMapTy;
MCContext::MCContext(const MCAsmInfo &mai, const TargetAsmInfo *tai) :
MAI(mai), TAI(tai), NextUniqueID(0),
- CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0) {
+ CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0),
+ AllowTemporaryLabels(true) {
MachOUniquingMap = 0;
ELFUniquingMap = 0;
COFFUniquingMap = 0;
@@ -76,8 +77,10 @@ MCSymbol *MCContext::GetOrCreateSymbol(StringRef Name) {
}
MCSymbol *MCContext::CreateSymbol(StringRef Name) {
- // Determine whether this is an assembler temporary or normal label.
- bool isTemporary = Name.startswith(MAI.getPrivateGlobalPrefix());
+ // Determine whether this is an assembler temporary or normal label, if used.
+ bool isTemporary = false;
+ if (AllowTemporaryLabels)
+ isTemporary = Name.startswith(MAI.getPrivateGlobalPrefix());
StringMapEntry<bool> *NameEntry = &UsedNames.GetOrCreateValue(Name);
if (NameEntry->getValue()) {