Metadata for a global variable is really a (GlobalVariable, Expression) tuple. Allow access to these, then allow retrieving the file, scope, and line for a DIVariable, whether global or local. This should be the last of the accessors required for uniform access to location and file information metadata.
@jberdine This patch handles the global variable side of things. You should be able to replace those accessors in Core with a call to LLVMGlobalCopyAllMetadata. You can filter for !dbg and dig out the global variable expression. From there, you locate from global variable expression to global variable with LLVMDIGlobalVariableExpressionGetVariable and from global variable to line with LLVMDIVariableGetLine.
In general, it isn't safe to assume that the first metadata attachment you find on a global variable is !dbg, so the existing bindings in Core will fail to retrieve information in some odd cases.