Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>
authorBob Wilson <bob.wilson@apple.com>
Mon, 24 Dec 2012 18:15:21 +0000 (18:15 +0000)
committerBob Wilson <bob.wilson@apple.com>
Mon, 24 Dec 2012 18:15:21 +0000 (18:15 +0000)
commita0be09f511c68a88ee95b73c8f0ebd78156a559e
tree678964cde398eea6351973aba975ccec327aad3b
parentfa45cdf646572cf11b03cfdaa63f75fd74fc7d34
Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>

When the backend is used from clang, it should produce proper diagnostics
instead of just printing messages to errs(). Other clients may also want to
register their own error handlers with the LLVMContext, and the same handler
should work for warnings in the same way as the existing emitError methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171041 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/LLVMContext.h
lib/Analysis/ProfileDataLoaderPass.cpp
lib/Analysis/ProfileInfoLoaderPass.cpp
lib/CodeGen/IntrinsicLowering.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Instrumentation/EdgeProfiling.cpp
lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp
lib/Transforms/Instrumentation/PathProfiling.cpp
lib/VMCore/LLVMContext.cpp