diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 6.1.1 (2018-05-06)
+
+* Fix the source distribution by adding missing files to extra-source-files.
+
 ## 6.1.0 (2018-05-05)
 
 * Remove the `MetadataNodeReference` constructor. References to
diff --git a/llvm-hs.cabal b/llvm-hs.cabal
--- a/llvm-hs.cabal
+++ b/llvm-hs.cabal
@@ -1,5 +1,5 @@
 name: llvm-hs
-version: 6.1.0
+version: 6.1.1
 license: BSD3
 license-file: LICENSE
 author: Anthony Cowley, Stephen Diehl, Moritz Kiefer <moritz.kiefer@purelyfunctional.org>, Benjamin S. Scarlet
@@ -29,12 +29,15 @@
   src/LLVM/Internal/FFI/InlineAssembly.h
   src/LLVM/Internal/FFI/Instruction.h
   src/LLVM/Internal/FFI/LibFunc.h
+  src/LLVM/Internal/FFI/Metadata.h
   src/LLVM/Internal/FFI/OrcJIT.h
   src/LLVM/Internal/FFI/SMDiagnostic.h
   src/LLVM/Internal/FFI/Target.h
   src/LLVM/Internal/FFI/Target.hpp
   src/LLVM/Internal/FFI/Type.h
   src/LLVM/Internal/FFI/Value.h
+  test/debug_metadata_1.ll
+  test/debug_metadata_2.ll
 tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1
 extra-source-files: CHANGELOG.md
 
diff --git a/src/LLVM/Internal/FFI/Metadata.h b/src/LLVM/Internal/FFI/Metadata.h
new file mode 100644
--- /dev/null
+++ b/src/LLVM/Internal/FFI/Metadata.h
@@ -0,0 +1,129 @@
+#ifndef __LLVM_INTERNAL_FFI__METADATA__H__
+#define __LLVM_INTERNAL_FFI__METADATA__H__
+
+enum {
+#define HANDLE_METADATA_LEAF(CLASS) CLASS##Kind,
+#include "llvm/IR/Metadata.def"
+#undef HANDLE_METADATA_LEAF
+} MetadataSubclassId;
+
+#define LLVM_HS_FOR_EACH_MDNODE_SUBCLASS(macro) \
+  macro(MDString) \
+  macro(ConstantAsMetadata) \
+  macro(LocalAsMetadata) \
+  macro(DistinctMDOperandPlaceholder) \
+  macro(MDTuple) \
+  macro(DILocation) \
+  macro(DIExpression) \
+  macro(DIGlobalVariableExpression) \
+  macro(GenericDINode) \
+  macro(DISubrange) \
+  macro(DIEnumerator) \
+  macro(DIBasicType) \
+  macro(DIDerivedType) \
+  macro(DICompositeType) \
+  macro(DISubroutineType) \
+  macro(DIFile) \
+  macro(DICompileUnit) \
+  macro(DISubprogram) \
+  macro(DILexicalBlock) \
+  macro(DILexicalBlockFile) \
+  macro(DINamespace) \
+  macro(DIModule) \
+  macro(DITemplateTypeParameter) \
+  macro(DITemplateValueParameter) \
+  macro(DIGlobalVariable) \
+  macro(DILocalVariable) \
+  macro(DIObjCProperty) \
+  macro(DIImportedEntity) \
+  macro(DIMacro) \
+  macro(DIMacroFile)
+
+enum LLVM_Hs_DwOp {
+#define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) LLVM_Hs_DwOp_##NAME = ID,
+#include "llvm/BinaryFormat/Dwarf.def"
+#undef HANDLE_DW_OP
+    LLVM_Hs_DwOp_LLVM_fragment = 0x1000
+};
+
+#define LLVM_HS_FOR_EACH_DW_OP(macro) \
+    macro(LLVM_fragment)              \
+    macro(stack_value)                \
+    macro(swap)                       \
+    macro(constu)                     \
+    macro(plus_uconst)                \
+    macro(plus)                       \
+    macro(minus)                      \
+    macro(mul)                        \
+    macro(deref)                      \
+    macro(xderef)
+
+enum LLVM_Hs_DwAtE {
+#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) LLVM_Hs_DwAtE_##NAME = ID,
+#include "llvm/BinaryFormat/Dwarf.def"
+#undef HANDLE_DW_ATE
+};
+
+#define LLVM_HS_FOR_EACH_DW_ATE(macro) \
+    macro(address)                     \
+    macro(boolean)                     \
+    macro(complex_float)               \
+    macro(float)                       \
+    macro(signed)                      \
+    macro(signed_char)                 \
+    macro(unsigned)                    \
+    macro(unsigned_char)               \
+    macro(imaginary_float)             \
+    macro(packed_decimal)              \
+    macro(numeric_string)              \
+    macro(edited)                      \
+    macro(signed_fixed)                \
+    macro(unsigned_fixed)              \
+    macro(decimal_float)               \
+    macro(UTF)                         \
+    macro(UCS)                         \
+    macro(ASCII)
+
+enum LLVM_Hs_DwTag {
+#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) LLVM_Hs_DwTag_##NAME = ID,
+#include "llvm/BinaryFormat/Dwarf.def"
+#undef HANDLE_DW_TAG
+};
+
+#define LLVM_HS_FOR_EACH_DW_TAG(macro) \
+    macro(imported_module) \
+    macro(imported_declaration) \
+    macro(typedef) \
+    macro(pointer_type) \
+    macro(ptr_to_member_type) \
+    macro(reference_type) \
+    macro(rvalue_reference_type) \
+    macro(const_type) \
+    macro(volatile_type) \
+    macro(restrict_type) \
+    macro(atomic_type) \
+    macro(member) \
+    macro(inheritance) \
+    macro(friend) \
+    macro(base_type) \
+    macro(unspecified_type) \
+    macro(template_value_parameter) \
+    macro(GNU_template_template_param) \
+    macro(GNU_template_parameter_pack) \
+    macro(array_type) \
+    macro(enumeration_type) \
+    macro(structure_type) \
+    macro(class_type) \
+    macro(union_type)
+
+enum LLVM_Hs_DwVirtuality {
+#define HANDLE_DW_VIRTUALITY(ID, NAME) LLVM_Hs_DwVirtuality_##NAME = ID,
+#include "llvm/BinaryFormat/Dwarf.def"
+#undef HANDLE_DW_VIRTUALITY
+};
+
+#define LLVM_HS_FOR_EACH_DW_VIRTUALITY(macro) \
+    macro(none) \
+    macro(virtual) \
+    macro(pure_virtual)
+#endif
diff --git a/test/debug_metadata_1.ll b/test/debug_metadata_1.ll
new file mode 100644
--- /dev/null
+++ b/test/debug_metadata_1.ll
@@ -0,0 +1,50 @@
+declare !foo !0 !bar !{!"baz"} !qux !{!2} void @f1()
+
+define void @f2() !foo !0 !bar !{!"baz"} !qux !{!2} {
+  ret void
+}
+
+; --- [ Metadata definitions ] -------------------------------------------------
+
+; Empty named metadata definition.
+!foo = !{}
+
+; Plain named metadata definition.
+!bar = !{!0}
+
+; Multiple metadata IDs.
+!baz = !{!0, !1, !15}
+
+; !vars = !{!9, !10, !11}
+; Empty metadata definition.
+!0 = !{}
+
+; Plain metadata definition.
+!1 = !{!0}
+
+; Multiple metadata IDs.
+!2 = !{!0, !1}
+
+; Distinct.
+!3 = distinct !{!2}
+
+; Nested metadata.
+!4 = !{!{!{!0}}}
+
+; Metadata string.
+!5 = !{!"foo"}
+
+; Metadata constant.
+!6 = !{i32 42}
+
+; Metadata constant.
+!7 = !{!{!"bar"}}
+
+!15 = !{ !9, !10, !8, !11}
+
+!8 = distinct !DISubprogram(name: "foo", scope: !9)
+!9 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+
+!10 = !DILexicalBlock(scope: !8, file: !9, line: 7, column: 35)
+
+!11 = !DINamespace(name: "Namespace", scope: !10)
diff --git a/test/debug_metadata_2.ll b/test/debug_metadata_2.ll
new file mode 100644
--- /dev/null
+++ b/test/debug_metadata_2.ll
@@ -0,0 +1,42 @@
+; ModuleID = 'test.c'
+source_filename = "test.c"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Function Attrs: noinline nounwind optnone sspstrong uwtable
+define i32 @f(i32) #0 !dbg !9 {
+  %2 = alloca i32, align 4
+  store i32 %0, i32* %2, align 4
+  call void @llvm.dbg.declare(metadata i32* %2, metadata !13, metadata !14), !dbg !15
+  %3 = load i32, i32* %2, align 4, !dbg !16
+  ret i32 %3, !dbg !17
+}
+
+; Function Attrs: nounwind readnone speculatable
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+
+attributes #0 = { noinline nounwind optnone sspstrong uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind readnone speculatable }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!3, !4, !5, !6, !7}
+!llvm.ident = !{!8}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 5.0.1 (tags/RELEASE_501/final)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
+!1 = !DIFile(filename: "test.c", directory: "/home/moritz/tmp")
+!2 = !{}
+!3 = !{i32 2, !"Dwarf Version", i32 4}
+!4 = !{i32 2, !"Debug Info Version", i32 3}
+!5 = !{i32 1, !"wchar_size", i32 4}
+!6 = !{i32 7, !"PIC Level", i32 2}
+!7 = !{i32 7, !"PIE Level", i32 2}
+!8 = !{!"clang version 5.0.1 (tags/RELEASE_501/final)"}
+!9 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!10 = !DISubroutineType(types: !11)
+!11 = !{!12, !12}
+!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!13 = !DILocalVariable(name: "x", arg: 1, scope: !9, file: !1, line: 1, type: !12)
+!14 = !DIExpression()
+!15 = !DILocation(line: 1, column: 11, scope: !9)
+!16 = !DILocation(line: 2, column: 12, scope: !9)
+!17 = !DILocation(line: 2, column: 5, scope: !9)
