[llvm] r294079 - fix nullptr Mangler in LTOModule
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 09:16:56 PST 2017
test?
On Fri, Feb 3, 2017 at 5:40 PM Bob Haarman via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: inglorion
> Date: Fri Feb 3 19:28:44 2017
> New Revision: 294079
>
> URL: http://llvm.org/viewvc/llvm-project?rev=294079&view=rev
> Log:
> fix nullptr Mangler in LTOModule
>
> Reviewers: kcc, pcc
>
> Subscribers: mehdi_amini
>
> Differential Revision: https://reviews.llvm.org/D29523
>
>
> Modified:
> llvm/trunk/lib/LTO/LTOModule.cpp
>
> Modified: llvm/trunk/lib/LTO/LTOModule.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=294079&r1=294078&r2=294079&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/LTO/LTOModule.cpp (original)
> +++ llvm/trunk/lib/LTO/LTOModule.cpp Fri Feb 3 19:28:44 2017
> @@ -16,6 +16,7 @@
> #include "llvm/ADT/Triple.h"
> #include "llvm/Bitcode/BitcodeReader.h"
> #include "llvm/CodeGen/Analysis.h"
> +#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
> #include "llvm/IR/Constants.h"
> #include "llvm/IR/DiagnosticPrinter.h"
> #include "llvm/IR/LLVMContext.h"
> @@ -647,11 +648,15 @@ void LTOModule::parseMetadata() {
> }
> }
>
> - // Globals
> + // Globals - we only need to do this for COFF.
> + const Triple TT(_target->getTargetTriple());
> + if (!TT.isOSBinFormatCOFF())
> + return;
> + Mangler M;
> for (const NameAndAttributes &Sym : _symbols) {
> if (!Sym.symbol)
> continue;
> - _target->getObjFileLowering()->emitLinkerFlagsForGlobal(OS,
> Sym.symbol);
> + emitLinkerFlagsForGlobalCOFF(OS, Sym.symbol, TT, M);
> }
>
> // Add other interesting metadata here.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170206/3076d51b/attachment.html>
More information about the llvm-commits
mailing list