diff options
author | Martin Storsjo <martin@martin.st> | 2018-12-05 13:22:56 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2018-12-05 13:22:56 +0000 |
commit | d0afe724d1f5ca3e0a46e75849450a934ffa5ef2 (patch) | |
tree | 25e93ff9bf602eb78d53188e8b625406c173b4d7 /llvm/test/tools/llvm-rc | |
parent | 8fdaf5c915de88bb7026afb709460a0d6bf81162 (diff) | |
download | bcm5719-llvm-d0afe724d1f5ca3e0a46e75849450a934ffa5ef2.tar.gz bcm5719-llvm-d0afe724d1f5ca3e0a46e75849450a934ffa5ef2.zip |
[llvm-rc] Support not expressions.
Patch by Jacek Caban!
Differential Revision: https://reviews.llvm.org/D55242
llvm-svn: 348363
Diffstat (limited to 'llvm/test/tools/llvm-rc')
-rw-r--r-- | llvm/test/tools/llvm-rc/Inputs/not-expr.rc | 17 | ||||
-rw-r--r-- | llvm/test/tools/llvm-rc/not-expr.test | 20 |
2 files changed, 37 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-rc/Inputs/not-expr.rc b/llvm/test/tools/llvm-rc/Inputs/not-expr.rc new file mode 100644 index 00000000000..1b5c8177393 --- /dev/null +++ b/llvm/test/tools/llvm-rc/Inputs/not-expr.rc @@ -0,0 +1,17 @@ +not DIALOGEX // not as an identifier +0, +3 | not 1, // = 2 +61 + not 1, // = 60 +not 1 | 3, // = 3 +7 | (not 1 + not 2) // = 4 +STYLE 0xff00ff03 & ~(not (1|2)) // = 0xff00ff03 +EXSTYLE 0xff00ff03 | ~(not (1|2)) | not 8 // = 0xfffffff7 +{ + GROUPBOX "", 0, + not 1, // = 0 + 15 + (((not 1 | not 2 | not 4) | 2)), // = 10 + 0, 0, 0x34 - (not 1) + (not 0x14) // expression evaluates to 0x20 with not mask 0x15, which clears 0x5 bits of default + // groupbox class style 0x50000007, resulting with style 0x50000022 + GROUPBOX "", 1, 0,0,0,0,(not 7) | 1 // expression evaluates to 1 with not mask 0x7, which clears 0x7 bits of groupbox default + // class style 0x50000007, but sets bit 1, resulting with style 0x50000001 +} diff --git a/llvm/test/tools/llvm-rc/not-expr.test b/llvm/test/tools/llvm-rc/not-expr.test new file mode 100644 index 00000000000..c60223425c7 --- /dev/null +++ b/llvm/test/tools/llvm-rc/not-expr.test @@ -0,0 +1,20 @@ +; RUN: llvm-rc /FO %t %p/Inputs/not-expr.rc +; RUN: llvm-readobj %t | FileCheck %s --check-prefix=NOTEXPR + +; NOTEXPR: Resource type (int): 5 +; NOTEXPR-NEXT: Resource name (string): NOT +; NOTEXPR-NEXT: Data version: 0 +; NOTEXPR-NEXT: Memory flags: 0x1030 +; NOTEXPR-NEXT: Language ID: 1033 +; NOTEXPR-NEXT: Version (major): 0 +; NOTEXPR-NEXT: Version (minor): 0 +; NOTEXPR-NEXT: Characteristics: 0 +; NOTEXPR-NEXT: Data size: 96 +; NOTEXPR-NEXT: Data: ( +; NOTEXPR-NEXT: 0000: 0100FFFF 04000000 F7FFFFFF 03FF00FF |................| +; NOTEXPR-NEXT: 0010: 02000000 02003C00 03000000 00000000 |......<.........| +; NOTEXPR-NEXT: 0020: 00000000 00000000 22000050 00000A00 |........"..P....| +; NOTEXPR-NEXT: 0030: 00000000 00000000 FFFF8000 00000000 |................| +; NOTEXPR-NEXT: 0040: 00000000 00000000 01000050 00000000 |...........P....| +; NOTEXPR-NEXT: 0050: 00000000 01000000 FFFF8000 00000000 |................| +; NOTEXPR-NEXT: ) |