diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-22 17:46:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-22 17:46:53 +0000 |
commit | 36b718fc74530d9a7e58185efa78fedbee7f5a13 (patch) | |
tree | ee65f3dca4a58396750c6b61075dcb4b902fafc7 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | 7d1483f51cc6a6ecb6e1802567592daf841f463d (diff) | |
download | llvm-36b718fc74530d9a7e58185efa78fedbee7f5a13.zip llvm-36b718fc74530d9a7e58185efa78fedbee7f5a13.tar.gz llvm-36b718fc74530d9a7e58185efa78fedbee7f5a13.tar.bz2 |
Avoid a Symbol -> Name -> Symbol conversion.
Before this we were producing a TargetExternalSymbol from a MCSymbol.
That meant extracting the symbol name and fetching the symbol again
down the pipeline.
This patch adds a DAG.getMCSymbol that lets the MCSymbol pass unchanged on the
DAG.
Doing so removes the need for MO_NOPREFIX and fixes the root cause of pr23900,
allowing r240130 to be committed again.
llvm-svn: 240300
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index fa6fd43..ae1cc0c 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2143,7 +2143,8 @@ TreePatternNode *TreePattern::ParseTreePattern(Init *TheInit, StringRef OpName){ Operator->getName() != "tblockaddress" && Operator->getName() != "tglobaladdr" && Operator->getName() != "bb" && - Operator->getName() != "vt") + Operator->getName() != "vt" && + Operator->getName() != "mcsym") error("Cannot use '" + Operator->getName() + "' in an output pattern!"); } |