]> granicus.if.org Git - clang/commit
[CodeGen] Insert TargetLibraryInfoWrapperPass before anything else.
authorMarcin Koscielnicki <koriakin@0x04.net>
Tue, 22 Nov 2016 20:03:35 +0000 (20:03 +0000)
committerMarcin Koscielnicki <koriakin@0x04.net>
Tue, 22 Nov 2016 20:03:35 +0000 (20:03 +0000)
commit238d8c3ac25438971bc27477507583c2ac85ecb6
treef07eb859463a1fe7f18211e48f628c93d28307b9
parent35ba12bf8d37e7a5ad7779492ee825ccb8a2c707
[CodeGen] Insert TargetLibraryInfoWrapperPass before anything else.

Currently, TargetLibraryInfoWrapperPass is inserted by PMBuilder.
However, some passes are inserted manually before the PMBuilder
ones - if any of them happens to use TargetLibraryInfoWrapperPass,
it'll get a default-constructed one, with an unknown target triple.
This happens to InstrProfiling in D21736, breaking it.

Differential Revision: http://reviews.llvm.org/D21737

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287688 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BackendUtil.cpp