llvm-project/lld/test/LinkerScript/memory-missing-attrs.test

33 lines
646 B
Plaintext

/*
RUN: linker-script-test %s 2> %t | FileCheck %s
RUN: FileCheck -input-file %t -check-prefix=CHECK-ERR %s
*/
MEMORY
{
ram () : ORIGIN = 0x20000000, LENGTH = 128M
/*
CHECK-ERR: [[@LINE-2]]:8: error: Expected memory attribute string.
CHECK-ERR-NEXT: {{^ ram \(\) : ORIGIN = 0x20000000, LENGTH = 128M}}
CHECK-ERR-NEXT: {{^ \^}}
*/
}
/*
CHECK: kw_memory: MEMORY
CHECK: l_brace: {
CHECK: identifier: ram
CHECK: l_paren: (
CHECK: r_paren: )
CHECK: colon: :
CHECK: kw_origin: ORIGIN
CHECK: equal: =
CHECK: number: 0x20000000
CHECK: comma: ,
CHECK: kw_length: LENGTH
CHECK: equal: =
CHECK: number: 128M
CHECK: r_brace: }
CHECK: eof:
*/