Adapt to new default opt level.
As the default opt level decides which user-set opt levels cling will complain about, "control flow" changes were needed for the tests.
This commit is contained in:
parent
a9808afd40
commit
315dfad70e
@ -37,16 +37,19 @@ gCling->getDefaultOptLevel()
|
||||
// CHECK-NEXT: Transaction OptLevel=2
|
||||
|
||||
{
|
||||
#pragma cling optimize(0)
|
||||
#pragma cling optimize(2)
|
||||
// CHECK-NEXT: cling::PHOptLevel: conflicting `#pragma cling optimize` directives: was already set to 2
|
||||
#pragma cling optimize(1)
|
||||
// CHECK-NEXT: Setting to lower value of 1
|
||||
#pragma cling optimize(2)
|
||||
// CHECK-NEXT: cling::PHOptLevel: conflicting `#pragma cling optimize` directives: was already set to 1
|
||||
// CHECK-NEXT: Ignoring higher value of 2
|
||||
printf("Transaction OptLevel=%d\n", (int)gCling->getLatestTransaction()->getCompilationOpts().OptLevel);
|
||||
}
|
||||
// CHECK-NEXT: cling::PHOptLevel: conflicting `#pragma cling optimize` directives: was already set to 0
|
||||
// CHECK-NEXT: Ignoring higher value of 1
|
||||
// CHECK-NEXT: Transaction OptLevel=0
|
||||
// CHECK-NEXT: Transaction OptLevel=1
|
||||
|
||||
.O
|
||||
// CHECK-NEXT: Current cling optimization level: 2
|
||||
// CHECK-NEXT: Current cling optimization level: 0
|
||||
|
||||
// No parenthesis
|
||||
{
|
||||
|
@ -14,12 +14,12 @@ extern "C" int printf(const char*,...);
|
||||
|
||||
gCling->getDefaultOptLevel() // CHECK: (int) 0
|
||||
.O // CHECK-NEXT: Current cling optimization level: 0
|
||||
(int)gCling->getLatestTransaction()->getCompilationOpts().OptLevel // CHECK-NEXT: (int) 2
|
||||
(int)gCling->getLatestTransaction()->getCompilationOpts().OptLevel // CHECK-NEXT: (int) 0
|
||||
|
||||
.O 2
|
||||
gCling->getDefaultOptLevel() // CHECK: (int) 2
|
||||
gCling->getDefaultOptLevel() // CHECK-NEXT: (int) 2
|
||||
.O // CHECK-NEXT: Current cling optimization level: 2
|
||||
|
||||
#pragma cling optimize(1)
|
||||
gCling->getDefaultOptLevel() // CHECK: (int) 0
|
||||
.O // CHECK-NEXT: Current cling optimization level: 0
|
||||
#pragma cling optimize(1) // shouldn't change default but only current transaction (which is empty except this pragma)
|
||||
gCling->getDefaultOptLevel() // CHECK-NEXT: (int) 2
|
||||
.O // CHECK-NEXT: Current cling optimization level: 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user