diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-03-13 18:09:26 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-03-13 18:09:26 +0000 |
| commit | 4269b9eed5f68832ecbf1b59e9ab07ce8ac38517 (patch) | |
| tree | 49afa296c1b54d3de3a72ff9e9f8af66e6ada316 /llvm/lib/MC/MCParser | |
| parent | 91cdc28d9300eb5dc8ced47cb31db26d8f5ca7d4 (diff) | |
| download | bcm5719-llvm-4269b9eed5f68832ecbf1b59e9ab07ce8ac38517.tar.gz bcm5719-llvm-4269b9eed5f68832ecbf1b59e9ab07ce8ac38517.zip | |
Use printable names to implement directional labels.
This changes the implementation of local directional labels to use a dedicated
map. With that it can then just use CreateTempSymbol, which is what the rest
of MC uses.
CreateTempSymbol doesn't do a great job at making sure the names are unique
(or being efficient when the names are not needed), but that should probably
be fixed in a followup patch.
This fixes pr18928.
llvm-svn: 203826
Diffstat (limited to 'llvm/lib/MC/MCParser')
| -rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 3d2131f10be..db448ae8be2 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -884,7 +884,7 @@ bool AsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) { } if (IDVal == "f" || IDVal == "b") { MCSymbol *Sym = - Ctx.GetDirectionalLocalSymbol(IntVal, IDVal == "f" ? 1 : 0); + Ctx.GetDirectionalLocalSymbol(IntVal, IDVal == "b"); Res = MCSymbolRefExpr::Create(Sym, Variant, getContext()); if (IDVal == "b" && Sym->isUndefined()) return Error(Loc, "invalid reference to undefined symbol"); |

