In AnalyseAsm, ignore labels that contain "." anywhere.
GCC appears to generate labels that look like "constantname.1234" for some array constants.
This commit is contained in:
parent
b65512b64c
commit
3fcf363a31
|
@ -77,9 +77,9 @@ parseAsmLine s
|
|||
-- digit.
|
||||
parseLabel :: String -> Maybe AsmItem
|
||||
parseLabel s@(c:cs)
|
||||
| c == '.' || isDigit c = Nothing
|
||||
| last cs == ':' = Just $ AsmLabel (liat s)
|
||||
| otherwise = Nothing
|
||||
| isDigit c || '.' `elem` s = Nothing
|
||||
| last cs == ':' = Just $ AsmLabel (liat s)
|
||||
| otherwise = Nothing
|
||||
where
|
||||
liat :: String -> String
|
||||
liat = reverse . tail . reverse
|
||||
|
|
|
@ -57,6 +57,7 @@ testParse = TestList
|
|||
|
||||
, testLine 350 ".blah:" $ Nothing
|
||||
, testLine 351 "0:" $ Nothing
|
||||
, testLine 352 "blah.1234:" $ Nothing
|
||||
]
|
||||
where
|
||||
testLine :: Int -> String -> Maybe AsmItem -> Test
|
||||
|
|
Loading…
Reference in New Issue
Block a user