diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-04 18:43:29 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-04 18:43:29 +0000 |
commit | c94da20917cb4dfa750903b366c920210c5265ee (patch) | |
tree | ac5750ee076e875d626663739037b59c82f565de /examples/ExceptionDemo | |
parent | 2337c1fd835fd7b0b890529ec133c81bb71d3b3d (diff) |
Make DataLayout Non-Optional in the Module
Summary:
DataLayout keeps the string used for its creation.
As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no longer
canonicalized, you can't rely on two "equals" DataLayout
having the same string returned by getStringRepresentation().
Get rid of DataLayoutPass: the DataLayout is in the Module
The DataLayout is "per-module", let's enforce this by not
duplicating it more than necessary.
One more step toward non-optionality of the DataLayout in the
module.
Make DataLayout Non-Optional in the Module
Module->getDataLayout() will never returns nullptr anymore.
Reviewers: echristo
Subscribers: resistor, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D7992
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/ExceptionDemo')
-rw-r--r-- | examples/ExceptionDemo/ExceptionDemo.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index 84cff0dd4c8..f6fc03de912 100644 --- a/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/examples/ExceptionDemo/ExceptionDemo.cpp @@ -1973,7 +1973,6 @@ int main(int argc, char *argv[]) { // Start with registering info about how the // target lays out data structures. module->setDataLayout(executionEngine->getDataLayout()); - fpm.add(new llvm::DataLayoutPass()); // Optimizations turned on #ifdef ADD_OPT_PASSES |