Make DataLayout Non-Optional in the Module
[oota-llvm.git] / lib / Target / CppBackend / CPPBackend.cpp
index c7fec52e0777bed6b7435ced74d4e618209cd55a..d0e2010abfd426e090003f6109c9b7e03da075f3 100644 (file)
@@ -1981,7 +1981,8 @@ void CppWriter::printModule(const std::string& fname,
   printEscapedString(mName);
   Out << "\", getGlobalContext());";
   if (!TheModule->getTargetTriple().empty()) {
-    nl(Out) << "mod->setDataLayout(\"" << TheModule->getDataLayout() << "\");";
+    nl(Out) << "mod->setDataLayout(\"" << TheModule->getDataLayoutStr()
+            << "\");";
   }
   if (!TheModule->getTargetTriple().empty()) {
     nl(Out) << "mod->setTargetTriple(\"" << TheModule->getTargetTriple()