summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
diff options
context:
space:
mode:
authorToma Tabacu <toma.tabacu@imgtec.com>2015-04-07 13:59:39 +0000
committerToma Tabacu <toma.tabacu@imgtec.com>2015-04-07 13:59:39 +0000
commitf25949b58843b7bfffc0cd7b1a78e229c45ad65e (patch)
treecbbd52e592c03566e76a8170b1d80a25c1927dea /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
parentb91455b5c052ef95e9c943133accdc96100890a7 (diff)
downloadbcm5719-llvm-f25949b58843b7bfffc0cd7b1a78e229c45ad65e.tar.gz
bcm5719-llvm-f25949b58843b7bfffc0cd7b1a78e229c45ad65e.zip
[mips] [IAS] Allow .set assignments for already defined symbols.
Summary: This is not possible when using the IAS for MIPS, but it is possible when using the IAS for other architectures and when using GAS for MIPS. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8578 llvm-svn: 234316
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 80cd26fc98e..fae31d09ac1 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -3579,11 +3579,7 @@ bool MipsAsmParser::parseSetAssignment() {
if (Parser.parseExpression(Value))
return reportParseError("expected valid expression after comma");
- // Check if the Name already exists as a symbol.
- MCSymbol *Sym = getContext().LookupSymbol(Name);
- if (Sym)
- return reportParseError("symbol already defined");
- Sym = getContext().GetOrCreateSymbol(Name);
+ MCSymbol *Sym = getContext().GetOrCreateSymbol(Name);
Sym->setVariableValue(Value);
return false;
OpenPOWER on IntegriCloud