From: Mehdi Amini Date: Tue, 16 Feb 2016 22:07:03 +0000 (+0000) Subject: Bitcode writer: fix a typo, using getName() instead of getSourceFileName() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83efea89e8be6bdfe3dbf26ad23bc5b06a817fe0;p=platform%2Fupstream%2Fllvm.git 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 llvm-svn: 261019 --- diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 0bca53a..4b7b0d7 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);