summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-02-16 22:07:03 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-02-16 22:07:03 +0000
commit83efea89e8be6bdfe3dbf26ad23bc5b06a817fe0 (patch)
tree950b18dca81b648fc75533024f82f1e17b514a80 /llvm/lib/Bitcode
parent0a0e54c194f68a56521048f82b530a1989a3cda7 (diff)
downloadbcm5719-llvm-83efea89e8be6bdfe3dbf26ad23bc5b06a817fe0.tar.gz
bcm5719-llvm-83efea89e8be6bdfe3dbf26ad23bc5b06a817fe0.zip
Bitcode writer: fix a typo, using getName() instead of getSourceFileName()
When emitting the source filename, the encoding of the string was checked against the name instead of the filename. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 261019
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 0bca53ae331..4b7b0d70044 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -821,8 +821,8 @@ static uint64_t WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
// Emit the module's source file name.
{
- StringEncoding Bits =
- getStringEncoding(M->getName().data(), M->getName().size());
+ StringEncoding Bits = getStringEncoding(M->getSourceFileName().data(),
+ M->getSourceFileName().size());
BitCodeAbbrevOp AbbrevOpToUse = BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8);
if (Bits == SE_Char6)
AbbrevOpToUse = BitCodeAbbrevOp(BitCodeAbbrevOp::Char6);
OpenPOWER on IntegriCloud