Skip to content
Commit d714fc75 authored by Pete Cooper's avatar Pete Cooper
Browse files

Use dyn_cast instead of static_cast.

Now that MachoFile has classof(), we can use dyn_cast instead which
is actually the only safe way to handle this.

Turns out this actually manifests as a bug as we were incorrectly
casting instances which weren't MachoFile in to a MachoFile.

Unfortunately, there's no reliable way of checking for this as it
requires that the file we are looking for has a 0 at exactly the byte
we need for the load of subsectionsViaSymbols.

llvm-svn: 259413
parent dbdb1d6e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment