summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-17 01:10:12 +0000
committerRui Ueyama <ruiu@google.com>2015-03-17 01:10:12 +0000
commitcc6b381651f23b572db15b8bf9df4bcff62edc57 (patch)
tree5f578d30c02c1ebecc5a0c939190ad4dafd32ba8
parent95d041215ae9daf5dc04bc8d6b7e2ccfcdc0c40e (diff)
downloadbcm5719-llvm-cc6b381651f23b572db15b8bf9df4bcff62edc57.tar.gz
bcm5719-llvm-cc6b381651f23b572db15b8bf9df4bcff62edc57.zip
Make it compile with MSVC 2013.
MSVC 2013 cannot compile this code because of C1001 "internal error". Stop using initializer list without type name. llvm-svn: 232448
-rw-r--r--lld/lib/ReaderWriter/ELF/DefaultLayout.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/lld/lib/ReaderWriter/ELF/DefaultLayout.h b/lld/lib/ReaderWriter/ELF/DefaultLayout.h
index 13d2f5c1946..e457821320d 100644
--- a/lld/lib/ReaderWriter/ELF/DefaultLayout.h
+++ b/lld/lib/ReaderWriter/ELF/DefaultLayout.h
@@ -435,11 +435,12 @@ DefaultLayout<ELFT>::getOutputSectionName(StringRef archivePath,
StringRef memberPath,
StringRef inputSectionName) const {
StringRef outputSectionName;
- if (_linkerScriptSema.hasLayoutCommands() &&
- !(outputSectionName = _linkerScriptSema.getOutputSection(
- {archivePath, memberPath, inputSectionName})).empty())
- return outputSectionName;
-
+ if (_linkerScriptSema.hasLayoutCommands()) {
+ script::Sema::SectionKey key = {archivePath, memberPath, inputSectionName};
+ outputSectionName = _linkerScriptSema.getOutputSection(key);
+ if (!outputSectionName.empty())
+ return outputSectionName;
+ }
return llvm::StringSwitch<StringRef>(inputSectionName)
.StartsWith(".text", ".text")
.StartsWith(".ctors", ".ctors")
OpenPOWER on IntegriCloud