diff options
| author | Owen Anderson <resistor@mac.com> | 2015-03-02 05:25:09 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2015-03-02 05:25:09 +0000 |
| commit | 576a9a2728505d81849e3a15cdbc70d398fb95c6 (patch) | |
| tree | 316403f09b819c8df5a9d0d714616ff85e943d5b /llvm/test/Assembler | |
| parent | 91bdf0765000295c18ba87b244bab3c412d07310 (diff) | |
| download | bcm5719-llvm-576a9a2728505d81849e3a15cdbc70d398fb95c6.tar.gz bcm5719-llvm-576a9a2728505d81849e3a15cdbc70d398fb95c6.zip | |
Teach the LLParser to fail gracefully when it encounters an invalid label name.
Previous it would either assert in +Asserts, or crash in -Asserts. Found by fuzzing LLParser.
llvm-svn: 230935
Diffstat (limited to 'llvm/test/Assembler')
| -rw-r--r-- | llvm/test/Assembler/invalid-label.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Assembler/invalid-label.ll b/llvm/test/Assembler/invalid-label.ll new file mode 100644 index 00000000000..33dc63610aa --- /dev/null +++ b/llvm/test/Assembler/invalid-label.ll @@ -0,0 +1,11 @@ +; RUN: not llvm-as < %s >/dev/null 2> %t +; RUN: FileCheck %s < %t +; Test the case where an invalid label name is used + +; CHECK: unable to create block named 'bb' + +define void @test(label %bb) { +bb: + ret void +} + |

