Skip to content
Snippets Groups Projects
Commit 37cbf28e authored by Hans Wennborg's avatar Hans Wennborg
Browse files

EntryExitInstrumenter: support __cyg_profile_func_enter_bare

It works just like __cyg_profile_func_enter but takes no arguments.

llvm-svn: 318783
parent bcfec0d6
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,8 @@ static void insertCall(Function &CurFn, StringRef Func, ...@@ -29,7 +29,8 @@ static void insertCall(Function &CurFn, StringRef Func,
Func == "\01_mcount" || Func == "\01_mcount" ||
Func == "\01mcount" || Func == "\01mcount" ||
Func == "__mcount" || Func == "__mcount" ||
Func == "_mcount") { Func == "_mcount" ||
Func == "__cyg_profile_func_enter_bare") {
Constant *Fn = M.getOrInsertFunction(Func, Type::getVoidTy(C)); Constant *Fn = M.getOrInsertFunction(Func, Type::getVoidTy(C));
CallInst::Create(Fn, "", InsertionPt); CallInst::Create(Fn, "", InsertionPt);
return; return;
......
...@@ -73,6 +73,10 @@ define void @f6() #6 { entry: ret void } ...@@ -73,6 +73,10 @@ define void @f6() #6 { entry: ret void }
; CHECK-LABEL: define void @f6 ; CHECK-LABEL: define void @f6
; CHECK: call void @_mcount ; CHECK: call void @_mcount
define void @f7() #7 { entry: ret void }
; CHECK-LABEL: define void @f7
; CHECK: call void @__cyg_profile_func_enter_bare
; The attributes are "consumed" when the instrumentation is inserted. ; The attributes are "consumed" when the instrumentation is inserted.
; CHECK: attributes ; CHECK: attributes
...@@ -84,3 +88,4 @@ attributes #3 = { "instrument-function-entry-inlined"="\01_mcount" } ...@@ -84,3 +88,4 @@ attributes #3 = { "instrument-function-entry-inlined"="\01_mcount" }
attributes #4 = { "instrument-function-entry-inlined"="\01mcount" } attributes #4 = { "instrument-function-entry-inlined"="\01mcount" }
attributes #5 = { "instrument-function-entry-inlined"="__mcount" } attributes #5 = { "instrument-function-entry-inlined"="__mcount" }
attributes #6 = { "instrument-function-entry-inlined"="_mcount" } attributes #6 = { "instrument-function-entry-inlined"="_mcount" }
attributes #7 = { "instrument-function-entry-inlined"="__cyg_profile_func_enter_bare" }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment