[PATCH] D33970: Object: Move datalayout check into irsymtab::build. NFCI.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 15:04:57 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL305023: Object: Move datalayout check into irsymtab::build. NFCI. (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D33970?vs=101650&id=101969#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33970
Files:
llvm/trunk/lib/Object/IRSymtab.cpp
Index: llvm/trunk/lib/Object/IRSymtab.cpp
===================================================================
--- llvm/trunk/lib/Object/IRSymtab.cpp
+++ llvm/trunk/lib/Object/IRSymtab.cpp
@@ -90,6 +90,10 @@
};
Error Builder::addModule(Module *M) {
+ if (M->getDataLayoutStr().empty())
+ return make_error<StringError>("input module has no datalayout",
+ inconvertibleErrorCode());
+
SmallPtrSet<GlobalValue *, 8> Used;
collectUsedGlobalVariables(*M, Used, /*CompilerUsed*/ false);
@@ -277,10 +281,6 @@
if (!MOrErr)
return MOrErr.takeError();
- if ((*MOrErr)->getDataLayoutStr().empty())
- return make_error<StringError>("input module has no datalayout",
- inconvertibleErrorCode());
-
Mods.push_back(MOrErr->get());
OwnedMods.push_back(std::move(*MOrErr));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33970.101969.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170608/f0afa4b1/attachment.bin>
More information about the llvm-commits
mailing list