diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/MC/MCAsmInfo.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/MC/MCAsmInfo.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/MC/MCAsmInfo.cpp b/contrib/llvm-project/llvm/lib/MC/MCAsmInfo.cpp index 9767ee6c1133..620d3e7cffc3 100644 --- a/contrib/llvm-project/llvm/lib/MC/MCAsmInfo.cpp +++ b/contrib/llvm-project/llvm/lib/MC/MCAsmInfo.cpp @@ -28,6 +28,12 @@ static cl::opt<DefaultOnOff> DwarfExtendedLoc( clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default)); +cl::opt<cl::boolOrDefault> UseLEB128Directives( + "use-leb128-directives", cl::Hidden, + cl::desc( + "Disable the usage of LEB128 directives, and generate .byte instead."), + cl::init(cl::BOU_UNSET)); + MCAsmInfo::MCAsmInfo() { SeparatorString = ";"; CommentString = "#"; @@ -51,6 +57,8 @@ MCAsmInfo::MCAsmInfo() { WeakDirective = "\t.weak\t"; if (DwarfExtendedLoc != Default) SupportsExtendedDwarfLocDirective = DwarfExtendedLoc == Enable; + if (UseLEB128Directives != cl::BOU_UNSET) + HasLEB128Directives = UseLEB128Directives == cl::BOU_TRUE; // FIXME: Clang's logic should be synced with the logic used to initialize // this member and the two implementations should be merged. @@ -101,8 +109,7 @@ MCAsmInfo::getExprForFDESymbol(const MCSymbol *Sym, } bool MCAsmInfo::isAcceptableChar(char C) const { - return (C >= 'a' && C <= 'z') || (C >= 'A' && C <= 'Z') || - (C >= '0' && C <= '9') || C == '_' || C == '$' || C == '.' || C == '@'; + return isAlnum(C) || C == '_' || C == '$' || C == '.' || C == '@'; } bool MCAsmInfo::isValidUnquotedName(StringRef Name) const { |