Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Issue 9290056: Remove llvm bitcode reader localmod that dropped datalayout. (Closed)
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- BitcodeReader.cpp - Internal BitcodeReader implementation ----------===// 1 //===- BitcodeReader.cpp - Internal BitcodeReader implementation ----------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This header defines the BitcodeReader class. 10 // This header defines the BitcodeReader class.
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 if (S == "le32-unknown-nacl") 1472 if (S == "le32-unknown-nacl")
1473 S = "armv7-none-linux-gnueabi"; 1473 S = "armv7-none-linux-gnueabi";
1474 // @LOCALMOD-END 1474 // @LOCALMOD-END
1475 TheModule->setTargetTriple(S); 1475 TheModule->setTargetTriple(S);
1476 break; 1476 break;
1477 } 1477 }
1478 case bitc::MODULE_CODE_DATALAYOUT: { // DATALAYOUT: [strchr x N] 1478 case bitc::MODULE_CODE_DATALAYOUT: { // DATALAYOUT: [strchr x N]
1479 std::string S; 1479 std::string S;
1480 if (ConvertToString(Record, 0, S)) 1480 if (ConvertToString(Record, 0, S))
1481 return Error("Invalid MODULE_CODE_DATALAYOUT record"); 1481 return Error("Invalid MODULE_CODE_DATALAYOUT record");
1482 1482 TheModule->setDataLayout(S);
1483 // @LOCALMOD-BEGIN
1484 // Figure out how to properly prevent
1485 // NaCl data layout from being overriden
1486 //TheModule->setDataLayout(S);
1487 // @LOCALMOD-END
1488 break; 1483 break;
1489 } 1484 }
1490 case bitc::MODULE_CODE_ASM: { // ASM: [strchr x N] 1485 case bitc::MODULE_CODE_ASM: { // ASM: [strchr x N]
1491 std::string S; 1486 std::string S;
1492 if (ConvertToString(Record, 0, S)) 1487 if (ConvertToString(Record, 0, S))
1493 return Error("Invalid MODULE_CODE_ASM record"); 1488 return Error("Invalid MODULE_CODE_ASM record");
1494 TheModule->setModuleInlineAsm(S); 1489 TheModule->setModuleInlineAsm(S);
1495 break; 1490 break;
1496 } 1491 }
1497 case bitc::MODULE_CODE_DEPLIB: { // DEPLIB: [strchr x N] 1492 case bitc::MODULE_CODE_DEPLIB: { // DEPLIB: [strchr x N]
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 R->setBufferOwned(false); 2816 R->setBufferOwned(false);
2822 2817
2823 std::string Triple(""); 2818 std::string Triple("");
2824 if (R->ParseTriple(Triple)) 2819 if (R->ParseTriple(Triple))
2825 if (ErrMsg) 2820 if (ErrMsg)
2826 *ErrMsg = R->getErrorString(); 2821 *ErrMsg = R->getErrorString();
2827 2822
2828 delete R; 2823 delete R;
2829 return Triple; 2824 return Triple;
2830 } 2825 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698