File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
test/Target/LLVMIR/Import Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2440,7 +2440,7 @@ LogicalResult ModuleImport::processFunction(llvm::Function *func) {
2440
2440
// Skip unreachable blocks.
2441
2441
if (!reachable.contains (&basicBlock)) {
2442
2442
if (basicBlock.hasAddressTaken ())
2443
- emitWarning (funcOp.getLoc ())
2443
+ emitError (funcOp.getLoc ())
2444
2444
<< " unreachable block '" << basicBlock.getName ()
2445
2445
<< " ' with address taken" ;
2446
2446
continue ;
Original file line number Diff line number Diff line change @@ -350,3 +350,13 @@ bb2:
350
350
declare i32 @g ()
351
351
352
352
declare i32 @__gxx_personality_v0 (...)
353
+
354
+ ; // -----
355
+
356
+ @g = private global ptr blockaddress (@fn , %bb1 )
357
+ define void @fn () {
358
+ ret void
359
+ ; CHECK: unreachable block 'bb1' with address taken
360
+ bb1:
361
+ ret void
362
+ }
You can’t perform that action at this time.
0 commit comments