Index: test/tools/llvm-rc/Inputs/tag-user.rc =================================================================== --- test/tools/llvm-rc/Inputs/tag-user.rc +++ test/tools/llvm-rc/Inputs/tag-user.rc @@ -1,6 +1,9 @@ 500 500 { 1, 2, 3, 4, 5, "data", L"wide data", 0xABCD, 0xABCDEF01L } +501 RCDATA { + 1, 2, 3, 4, 5, "data", L"wide data", 0xABCD, 0xABCDEF01L +} NAME1 NAME2 {} Index: test/tools/llvm-rc/tag-user.test =================================================================== --- test/tools/llvm-rc/tag-user.test +++ test/tools/llvm-rc/tag-user.test @@ -20,6 +20,21 @@ ; CHECK-NEXT: 0020: CDAB01EF CDAB |......| ; CHECK-NEXT: ) +; CHECK-DAG: Resource type (int): 10 +; CHECK-NEXT: Resource name (int): 501 +; CHECK-NEXT: Data version: 0 +; CHECK-NEXT: Memory flags: 0x30 +; CHECK-NEXT: Language ID: 1033 +; CHECK-NEXT: Version (major): 0 +; CHECK-NEXT: Version (minor): 0 +; CHECK-NEXT: Characteristics: 0 +; CHECK-NEXT: Data size: 38 +; CHECK-NEXT: Data: ( +; CHECK-NEXT: 0000: 01000200 03000400 05006461 74617700 |..........dataw.| +; CHECK-NEXT: 0010: 69006400 65002000 64006100 74006100 |i.d.e. .d.a.t.a.| +; CHECK-NEXT: 0020: CDAB01EF CDAB |......| +; CHECK-NEXT: ) + ; CHECK-DAG: Resource type (string): NAME2 ; CHECK-NEXT: Resource name (string): NAME1 ; CHECK-NEXT: Data version: 0 Index: tools/llvm-rc/ResourceScriptParser.cpp =================================================================== --- tools/llvm-rc/ResourceScriptParser.cpp +++ tools/llvm-rc/ResourceScriptParser.cpp @@ -80,6 +80,8 @@ Result = parseIconResource(); else if (TypeToken->equalsLower("MENU")) Result = parseMenuResource(); + else if (TypeToken->equalsLower("RCDATA")) + Result = parseUserDefinedResource(RkRcData); else if (TypeToken->equalsLower("VERSIONINFO")) Result = parseVersionInfoResource(); else Index: tools/llvm-rc/ResourceScriptStmt.h =================================================================== --- tools/llvm-rc/ResourceScriptStmt.h +++ tools/llvm-rc/ResourceScriptStmt.h @@ -127,6 +127,7 @@ RkDialog = 5, RkStringTableBundle = 6, RkAccelerators = 9, + RkRcData = 10, RkCursorGroup = 12, RkIconGroup = 14, RkVersionInfo = 16,