ParseFile parses the given LLVM IR assembly file into an LLVM IR module.
(path string)
| 21 | |
| 22 | // ParseFile parses the given LLVM IR assembly file into an LLVM IR module. |
| 23 | func ParseFile(path string) (*ir.Module, error) { |
| 24 | buf, err := ioutil.ReadFile(path) |
| 25 | if err != nil { |
| 26 | return nil, errors.WithStack(err) |
| 27 | } |
| 28 | return ParseBytes(path, buf) |
| 29 | } |
| 30 | |
| 31 | // Parse parses the given LLVM IR assembly file into an LLVM IR module, reading |
| 32 | // from r. An optional path to the source file may be specified for error |
searching dependent graphs…