forked from OSchip/llvm-project
[AbstractCallSite][FIX] Correct faulty assertion
When the Attributor run on the IPConstantProp test case for multiple callbacks it triggered a faulty assertion in the AbstractCallSite implementation. The callee can well be at argument position 0.
This commit is contained in:
parent
83503ad119
commit
4c56086f8b
|
@ -850,7 +850,7 @@ public:
|
|||
/// callee of this ACS. Only valid for callback calls!
|
||||
int getCallArgOperandNoForCallee() const {
|
||||
assert(isCallbackCall());
|
||||
assert(CI.ParameterEncoding.size() && CI.ParameterEncoding[0] > 0);
|
||||
assert(CI.ParameterEncoding.size() && CI.ParameterEncoding[0] >= 0);
|
||||
return CI.ParameterEncoding[0];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: opt -ipconstprop -S < %s | FileCheck %s
|
||||
; RUN: opt -S -passes=attributor -aa-pipeline='basic-aa' -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=1 < %s | FileCheck %s
|
||||
;
|
||||
;
|
||||
; /---------------------------------------|
|
||||
|
|
Loading…
Reference in New Issue