mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Revert "Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>"
This reverts r171041. This was a nice idea that didn't work out well. Clang warnings need to be associated with warning groups so that they can be selectively disabled, promoted to errors, etc. This simplistic patch didn't allow for that. Enhancing it to provide some way for the backend to specify a front-end warning type seems like overkill for the few uses of this, at least for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174748 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include "llvm/Analysis/ProfileInfo.h"
|
||||
#include "llvm/Analysis/ProfileInfoLoader.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
@@ -76,8 +75,8 @@ inline static void printEdgeCounter(ProfileInfo::Edge e,
|
||||
bool OptimalEdgeProfiler::runOnModule(Module &M) {
|
||||
Function *Main = M.getFunction("main");
|
||||
if (Main == 0) {
|
||||
M.getContext().emitWarning("cannot insert edge profiling into a module"
|
||||
" with no main function");
|
||||
errs() << "WARNING: cannot insert edge profiling into a module"
|
||||
<< " with no main function!\n";
|
||||
return false; // No main, no instrumentation!
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user