self-hosted: cleanup build looking for llvm-config

This commit is contained in:
Andrew Kelley
2017-12-12 16:03:20 -05:00
parent cd5fd653d7
commit 2b9302107f
3 changed files with 76 additions and 74 deletions

View File

@@ -42,6 +42,11 @@ pub const BufMap = struct {
}
}
pub fn get(self: &BufMap, key: []const u8) -> ?[]const u8 {
const entry = self.hash_map.get(key) ?? return null;
return entry.value;
}
pub fn delete(self: &BufMap, key: []const u8) {
const entry = self.hash_map.remove(key) ?? return;
self.free(entry.key);