Index: test/CodeGen/asm-parser-info.S =================================================================== --- test/CodeGen/asm-parser-info.S +++ test/CodeGen/asm-parser-info.S @@ -0,0 +1,12 @@ +// REQUIRES: x86-registered-target +// RUN: %clang --target=x86_64-unknown-linux-gnu -c %s -o /dev/null + +// Check that cc1as can use assembler info in object generation. +.data + +foo: +.if . - foo == 0 + .byte 0xaa +.else + .byte 0x00 +.endif Index: tools/driver/cc1as_main.cpp =================================================================== --- tools/driver/cc1as_main.cpp +++ tools/driver/cc1as_main.cpp @@ -435,6 +435,9 @@ Str.get()->InitSections(Opts.NoExecStack); } + // Assembly to object compilation should leverage assembly info. + Str->setUseAssemblerInfoForParsing(true); + bool Failed = false; std::unique_ptr Parser(