Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LLVM 13 #202

Merged
merged 9 commits into from
Apr 3, 2023
Prev Previous commit
Next Next commit
Parse DISubprogram's spFlags correctly on LLVM 8.0+
This corrects an inadvertent mistake introduced in #137 where the order of
cases was reversed.

Fixes #211.
  • Loading branch information
RyanGlScott committed Mar 27, 2023
commit cc1d384a83cd82392decaff83ca1e72998e605c1
4 changes: 2 additions & 2 deletions src/Data/LLVM/BitCode/IR/Metadata.hs
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,9 @@ parseMetadataEntry vt mt pm (fromEntry -> Just r) =

(diFlags0, spFlags0) <-
if hasSPFlags then
(,) <$> parseField r (11 + 2) numeric <*> pure 0
else
(,) <$> parseField r 11 numeric <*> parseField r 9 numeric
else
(,) <$> parseField r (11 + 2) numeric <*> pure 0

let diFlagMainSubprogram = bit 21 :: Word32
hasOldMainSubprogramFlag = (diFlags0 .&. diFlagMainSubprogram) /= 0
Expand Down