From 719dc0e356ca506b9aefd4248f0f9b2def805e76 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 1 Feb 2017 17:15:24 +0000 Subject: [PATCH] Add missing test cases from r293697/D29094 Differential Revision: https://reviews.llvm.org/D29368 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293785 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/tools/llvm-symbolizer/Inputs/discrim | Bin 0 -> 9973 bytes test/tools/llvm-symbolizer/Inputs/discrim.c | 8 ++++ test/tools/llvm-symbolizer/Inputs/discrim.inp | 5 +++ test/tools/llvm-symbolizer/sym-verbose.test | 36 ++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 test/tools/llvm-symbolizer/Inputs/discrim create mode 100644 test/tools/llvm-symbolizer/Inputs/discrim.c create mode 100644 test/tools/llvm-symbolizer/Inputs/discrim.inp create mode 100644 test/tools/llvm-symbolizer/sym-verbose.test diff --git a/test/tools/llvm-symbolizer/Inputs/discrim b/test/tools/llvm-symbolizer/Inputs/discrim new file mode 100644 index 0000000000000000000000000000000000000000..ec61fe960bffb5efd7cc3cf7d0d96e58ed231c49 GIT binary patch literal 9973 zcmeHNZERcB89vw7ZWB_Rj~1FxMm*L^X|=dXns(-+^g3x;o4JLhDGWilabhPiICinG zOTtj;mX;}EWu3;4ZfH`a{ppYWoVM&kBPA1L8k)kiX-JHTA{y6%8`wh#Lxe;v;w|E4 zu?DaY5BnKPV|i6&&9X*iqeFV}ggiD7@)%NKd7}*rmRv)UR9-n4O10%nR3QYGLIk8u zJW6WtOA~TPDlFSd^{~^KM=olJv@fc%uGSApjmAbz1!*@o*!Wsl#ODxj z;7za9H+OoK_3ogYi-H7X34QOPKQ{u(fiwIk` zkxfNjT!h*AZgl452O~3YM5f=oeD^@~#ku2{X^|JtH%Rf~Wv?NYehSAAM(bPm3NgC} z6+9ei4?#qxulgf17asKt&d*W-RIv{RpQEJW>-DY237aL0{m)<3;UAfKK63ujo`|*> zdHHGqbw`J$t^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gZIDRD4cIV z7+7NtMt^BMzMIs64`wSFUyYW2A!sZGn~`A0IJ<@4DqJ8F4*Hv-q__Rcjw+krQs z-{@;M1ztXP0}n`~GNL~u1aO<^p8vG&Hvo6f|A&D$RaqY%k$7d^WSv&|xby!3@W66+ z@gv}kxFPCrwd-euJJuf_uLa=LUiz$0At__*JHQ)6i-@@Lc}@Ad*S$BDzq`Gcl|SDj z1yueY0%u)8Qq-cuss8SKt^;1pe>?CdyumJ8w?}eT-YVdW`Uw86ac6J88H*koFinw2 z=8|KnJZ@i1Yr-5!XEV4(r~;WLE|%xvxKbpwH|(xEGDE zTf}-rCJABgz3*W7K(rTLjuiR#6=Cj=-PIG0nRo5mcc^c`90>Qs`Y1d350{aALDpTE z(SZYIxuXUS^inqs#D~*KLH9fMKVO8Il$Sk<=UVsS-{1vvue~Bl$imj8e`&`N$K|ga_&58_N&qDO~>__c{|0Ins%QWJ literal 0 HcmV?d00001 diff --git a/test/tools/llvm-symbolizer/Inputs/discrim.c b/test/tools/llvm-symbolizer/Inputs/discrim.c new file mode 100644 index 00000000000..decbce8d454 --- /dev/null +++ b/test/tools/llvm-symbolizer/Inputs/discrim.c @@ -0,0 +1,8 @@ +static volatile int do_mul; +static volatile int do_inc; + +int main () { + int x = 1; + if (do_mul) x *= 2; else x /= 2; + return do_inc ? ++x : --x; +} diff --git a/test/tools/llvm-symbolizer/Inputs/discrim.inp b/test/tools/llvm-symbolizer/Inputs/discrim.inp new file mode 100644 index 00000000000..f8ad6018d70 --- /dev/null +++ b/test/tools/llvm-symbolizer/Inputs/discrim.inp @@ -0,0 +1,5 @@ +some text +0x4004f2 +0x400509 +0x40050d +some more text diff --git a/test/tools/llvm-symbolizer/sym-verbose.test b/test/tools/llvm-symbolizer/sym-verbose.test new file mode 100644 index 00000000000..b8c3a418b93 --- /dev/null +++ b/test/tools/llvm-symbolizer/sym-verbose.test @@ -0,0 +1,36 @@ +#static volatile int do_mul; +#static volatile int do_inc; +# +#int main () { +# int x = 1; +# if (do_mul) x *= 2; else x /= 2; +# return do_inc ? ++x : --x; +#} +#Build as : clang -g -O2 discrim.c -o discrim + +RUN: llvm-symbolizer -verbose -print-address -obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s + +#CHECK: some text + +#CHECK: 0x4004f2 +#CHECK-NEXT: main +#CHECK-NEXT: Filename: /tmp/discrim.c +#CHECK-NEXT: Line: 6 +#CHECK-NEXT: Column: 7 +#CHECK-NOT: Discriminator: 0 + +#CHECK: 0x400509 +#CHECK-NEXT: main +#CHECK-NEXT: Filename: /tmp/discrim.c +#CHECK-NEXT: Line: 7 +#CHECK-NEXT: Column: 3 +#CHECK-NEXT: Discriminator: 1 + +#CHECK: 0x40050d +#CHECK-NEXT: main +#CHECK-NEXT: Filename: /tmp/discrim.c +#CHECK-NEXT: Line: 7 +#CHECK-NEXT: Column: 3 +#CHECK-NEXT: Discriminator: 2 + +#CHECK: some more text