diff options
Diffstat (limited to 'llvm/examples/ExceptionDemo/ExceptionDemo.cpp')
-rw-r--r-- | llvm/examples/ExceptionDemo/ExceptionDemo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp index 4b7023faef2..24e538cacf2 100644 --- a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp @@ -1976,7 +1976,8 @@ int main(int argc, char *argv[]) { // Set up the optimizer pipeline. // Start with registering info about how the // target lays out data structures. - fpm.add(new llvm::DataLayoutPass(*executionEngine->getDataLayout())); + module->setDataLayout(executionEngine->getDataLayout()); + fpm.add(new llvm::DataLayoutPass(module)); // Optimizations turned on #ifdef ADD_OPT_PASSES |